package com.hoshiicloud.saleorder.param;

import com.alibaba.fastjson.annotation.JSONField;
import com.hoshiicloud.common.query.PageParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 * 查询订单信息参数
 * </p>
 *
 * @author zhangshuhu
 * @since 2019-06-03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "查询订单信息", description = "查询订单信息")
public class OrderInfoQueryParam extends PageParam {


    @ApiModelProperty(value = "租户id")
    private Long companyId;

    @ApiModelProperty(value = "平台id")
    private Long platformId;

    @ApiModelProperty(value = "店铺ID")
    private Long storeId;

    @ApiModelProperty(value = "主单ID")
    private List<Long> mainId;

    @ApiModelProperty(value = "主单编号")
    private String mainNo;

    @ApiModelProperty(value = "订单号")
    private String orderNo;

    @ApiModelProperty(value = "会员ID")
    private Long memberId;

    @ApiModelProperty(value = "发货单号，发货时填写，可在订单查询查看")
    private String invoiceNo;

    @ApiModelProperty(value = "商家给客户的留言,当该字段有值时可以在订单查询看到")
    private String toBuyer;

    @ApiModelProperty(value = "付款备注，在订单管理里编辑修改")
    private String payNote;

    @ApiModelProperty(value = "商品总金额")
    private BigDecimal goodsAmount;

    @ApiModelProperty(value = "配送费用")
    private BigDecimal shippingFee;

    @ApiModelProperty(value = "保价费用")
    private BigDecimal insureFee;

    @ApiModelProperty(value = "支付费用(,跟支付方式的配置相关，取值表payment)")
    private BigDecimal payFee;

    @ApiModelProperty(value = "包装费用，取值表取值表pack")
    private BigDecimal packFee;

    @ApiModelProperty(value = "发票税额")
    private BigDecimal tax;

    @ApiModelProperty(value = "应付款金额")
    private BigDecimal orderAmount;

    @ApiModelProperty(value = "订单实付金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "退款金额")
    private BigDecimal backAmount;

    @ApiModelProperty(value = "金额金额")
    private BigDecimal coinsAmount;

    @ApiModelProperty(value = "付款时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime paidTime;

    @ApiModelProperty(value = "取消时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime cancelledTime;

    @ApiModelProperty(value = "交付时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deliveryTime;

    @ApiModelProperty(value = "收货时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime receivedTime;

    @ApiModelProperty(value = "更新人")
    private String updatedBy;

    @ApiModelProperty(value = "优惠券金额（抵扣金额）")
    private BigDecimal benefitsAmount;

    @ApiModelProperty(value = "余额抵扣金额")
    private BigDecimal balanceAmount;

    @ApiModelProperty(value = "积分数")
    private Long points;

    @ApiModelProperty(value = "是否删除")
    private Integer deleted;

    @ApiModelProperty(value = "商品名称")
    private String spuName;

    @ApiModelProperty(value = "规格")
    private String skuName;

    @ApiModelProperty(value = "spu no")
    private String spuNo;

    @ApiModelProperty(value = "spu id")
    private Long spuId;

    @ApiModelProperty(value = "skuNo")
    private String skuNo;

    @ApiModelProperty(value = "skuId")
    private Long skuId;

    @ApiModelProperty(value = "税率")
    private BigDecimal rate;

    @ApiModelProperty(value = "税额")
    private BigDecimal rateAmount;

    @ApiModelProperty(value = "spu属性 json")
    private String spuExtendProp;

    @ApiModelProperty(value = "spu规格 json")
    private String spuExtendSpec;

    @ApiModelProperty(value = "sku属性 json")
    private String skuExtendProp;

    @ApiModelProperty(value = "售价")
    private BigDecimal saleUnitPrice;

    @ApiModelProperty(value = "单价(最终交易价)")
    private BigDecimal unitPrice;

    @ApiModelProperty(value = "数量")
    private Long quantity;

    @ApiModelProperty(value = "活动编号")
    private Long activityNo;

    @ApiModelProperty(value = "是否自营")
    private Integer own;

    @ApiModelProperty(value = "是否跨境")
    private Integer overseas;

    @ApiModelProperty(value = "订单状态 0: 待付款 1: 订单取消 2: 清关中 3: 清关失败 4: 待发货 5: 待收货 6: 未提货 7: 未配送 8: 配送中 9: 退款成功 10:已收货 11: 已提货")
    private Integer orderStatus;

    @ApiModelProperty(value = "商品配送情况 0，未发货；1，已发货 2-部分发货   3，已收货；4 部分收货 5 ，备货中")
    private Integer shippingStatus;

    @ApiModelProperty(value = "支付状态 0-未支付 1-已支付 2-已退款 3-部分退款")
    private Integer payStatus;

    @ApiModelProperty(value = "售后状态  0-未售后 1-已售后 2-部分售后")
    private Integer serviceStatus;

    /**
     * 退款状态
     */
    @ApiModelProperty(value = "退款状态 0-无需退款 1-未退款 2-已部分退款 3-已全额退款")
    private Integer refundStatus;

    /**
     * 退货状态
     */
    @ApiModelProperty(value = "退货状态  0-无需退货 1-未退货 2-已部分退货 3-已全部退货")
    private Integer returnGoodsStatus;

    @ApiModelProperty(value = "售后订单参考")
    private String serviceRefNo;

    @ApiModelProperty(value = "支付订单id")
    private Long payOrderId;

    @ApiModelProperty(value = "归档状态  0-未归档 1-已归档")
    private Integer archived;
}
